Digital video is generally processed in sets of video frames. Each frame is a still image representing an instant in time of the video being processed. Each frame can further be broken down into blocks. The blocks are individually transmitted and then recombined to form a frame. The amount of data needed to represent the image blocks can become large. Motion compensation can be used to reduce the amount of data needed to represent the image blocks.
Using motion compensation, image blocks can be represented by motion compensation vectors and error correction data. Motion compensation vectors are used on prediction frames. An object in one frame may simply be displaced either partially or fully into in a new frame. Image blocks used to represent the object in the new frame may be processed with motion vectors, using the image blocks in the original frame as reference. The motion vectors provide the direction and distance in which the referenced image blocks have moved to in the new, or predicted, frame.
In some cases, motion compensation vectors are all that are needed to reproduce an image block. However, in many situations, some errors exist between the referenced image blocks and the blocks in the predicted frame. Error correction data can be sent to recover the differences and adequately generate the image block. The error correction data itself is basic image information, including the luminance of the pixels within the image block. A transform, such as a discrete cosine transform (DCT), can be used to reduce the size of the error correction data to a transformed data set. The transformed data set includes transform coefficients, which can then be inverse transformed to reproduce the error correction data. In some cases, no motion vectors can be generated for a given image block. For example, when a video switches to a new scene none of the objects in the new frame can be referenced to objects in the previous frame. In such a case, the image block is represented only with error correction data. Furthermore, some reference frames for motion compensation are made up of image blocks represented with only error correction data. They are referred to as intra-frames, or I-frames. Prediction frames, or P-frames, are motion compensated frames that use previous I- or P-frames for reference. Bi-directional frames can use previous or upcoming I- or P-frames for reference. It should be noted that B-frames are never used as reference themselves to avoid the accumulation of precision errors.
To process the frame data, conventional video processing hardware is used to capture the motion compensation vector data and the error correction data. The transformed data sets are inverse transformed, such as through an inverse discrete cosine transform (IDCT) component, to accurately reproduce the error correction data. Many times, errors are present in the transformed error correction data and motion compensation vector data received through the video processing hardware. While motion compensation vector data may continue to be processed despite errors present, conventional video processing hardware generally becomes stalled when trying to process erroneous transformed error correction data. Transformed error correction data is generally collected and processed in blocks of data by the IDCT component. Errors may cause an underflow or overflow of data into the block of data to be processed. For example, when an underflow occurs, some of the data related to a block of data is not received and the block of data is incomplete. When an overflow occurs, extraneous data is stored in relation to the same data block. An unexpected underflow may force the IDCT component to wait for more data to complete the data block. An overflow may force the IDCT component to attempt to process extraneous data, beyond the boundary of the block of data. Underflow and overflow errors can result in the loss of multiple frames of video data as conventional video processing hardware must wait for the IDCT component to resume normal operation. Therefore, a way to handle errors received by the IDCT component would be highly useful.